<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<script type="text/javascript">
<!--
	function goPage(){
		var page = document.getElementById("page_select").value;
		window.location.href="${link}&page="+page;
	}
//-->
</script>
<div style="clear: both;"></div>
<!--分页-->
<c:if test="${pageModel.totalPage > 1}">
	<div id="thePage">
		<form>
			<c:choose>
				<c:when test="${pageModel.currentPage > 1}">
					<a href="${link}&page=1"><span id="pageHome" title="首页"></span></a>
				</c:when>
				<c:otherwise>
					<a href="javascript:;"><span id="pageHome" title="首页"></span></a>
				</c:otherwise>
			</c:choose>
			
			
			<c:choose>
				<c:when test="${pageModel.currentPage > 1}">
					<a href="${link}&page=${pageModel.currentPage-1}"><span id="previous" title="上一页"></span></a>
				</c:when>
				<c:otherwise>
					<a href="javascript:;"><span id="previous" title="上一页"></span></a>
				</c:otherwise>
			</c:choose>
			
			<select id="page_select">
				<c:forEach begin="1" end="${pageModel.totalPage}" var="i">
					<option value="${i}"
					<c:if test="${i==pageModel.currentPage}">
						SELECTED
					</c:if>
					>
						${i}/${pageModel.totalPage}
					</option>
				</c:forEach>
			</select>
			<input type="button" value="GO" onclick="goPage();"/>
			<c:choose>
				<c:when test="${pageModel.currentPage < pageModel.totalPage}">
					<a href="${link}&page=${pageModel.currentPage+1}"><span id="next" title="下一页"></span></a>
				</c:when>
				<c:otherwise>
					<a href="javascript:;"><span id="next" title="下一页"></span></a>
				</c:otherwise>
			</c:choose>
			
			
			<c:choose>
				<c:when test="${pageModel.currentPage < pageModel.totalPage}">
					<a href="${link}&page=${pageModel.totalPage}"><span id="end" title="尾页"></span></a>
				</c:when>
				<c:otherwise>
					<a href="javascript:;"><span id="end" title="尾页"></span></a>
				</c:otherwise>
			</c:choose>
			
			
		</form>
	</div>
</c:if>

<!--分页//-->